// StraightNozzle.cpp: implementation of the StraightNozzle class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "StraightNozzle.h"
#include "StraightNozzleGeometry.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

UE_IMPLEMENT_DYNAMIC(StraightNozzle,Nozzle)

StraightNozzle::StraightNozzle()
{

}

StraightNozzle::~StraightNozzle()
{

}


AcGeVector3d& StraightNozzle::GetFixDir()
{
	return m_FixDir;
}

void StraightNozzle::SetFixDir(AcGeVector3d &vector)
{
	m_FixDir = vector;
}

double StraightNozzle::GetLength()
{
	return m_dLength;
}

void StraightNozzle::SetLength(double dLength)
{
	m_dLength = dLength;

}


void StraightNozzle::TransformBy(const AcGeMatrix3d &mtForm)
{
	m_FixDir = mtForm*m_FixDir ;

	Nozzle::TransformBy(mtForm);
}

PersistentObject* StraightNozzle::Clone()
{
	int length = sizeof(StraightNozzle);
	char* pclone = new char[length];
	StraightNozzle* pNew = NULL;

	memcpy(pclone, this, length);
	pNew = (StraightNozzle*)pclone;

	StraightNozzleGeometry* pSNG = ((StraightNozzleGeometry*)(pNew->m_pCurGeo));

	pNew->m_pCurGeo = pSNG->Clone();
	((StraightNozzleGeometry*)pNew->m_pCurGeo)->SetpElement(this);
	return pNew;
}